﻿using PRO.ORM;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace PRO.Permission.Entity
{
    /// <summary>
    /// 用户信息实体类基类，在系统里需要对用户使用权限管理就必须继承此类
    /// </summary>
    public class BaseUserInfo : BaseEntity
    {
        private int _ID;
        /// <summary>
        /// 用户唯一编号
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Int, Len = 4, PrimaryKey = true)]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        private bool _Locked = false;
        /// <summary>
        /// 该用户是否被锁定，锁定后没有任何权限
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Bit, Len = 1, DefaultValue = false)]
        public bool Locked
        {
            get { return _Locked; }
            set { _Locked = value; }
        }
        private int _GroupID;
        /// <summary>
        /// 用户分组ID，0表示超级管理员
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Int, Len = 4)]
        public int GroupID
        {
            get { return _GroupID; }
            set { _GroupID = value; }
        }
    }
}
